package router

import (
	"admin-ease/handlers"
	"github.com/gin-gonic/gin"
)

func Init() *gin.Engine {
	r := gin.Default()
	r.POST("/login", handlers.Login)
	r.POST("/create", handlers.CreateRoleNode)
	r.POST("/role/create", handlers.UserRole)
	r.POST("/node/create", handlers.UserNode)
	r.POST("/user/create", handlers.CreateUser)
	r.GET("/list", handlers.List)
	return r
}
